extends "../../azurlane_ctrl/AzurItem.gd"
func init():
	.init()
	name = "[稀有]投影仪"
	info = "战斗开始时会召唤一个佩戴者的克隆体\n一个角色只能携带一件本装备\n[color=#DC143C]同时装备两件时可升级[/color]"
	price = 300
	att.defR = -0.2
	
func _connect():
	._connect()
	for i in masCha.items:
		if i.id == id and i != self:
			delFromCha()
			return
	sys.main.connect("onBattleStart",self,"runStart")

func runStart():
	if sys.main.matCha(masCha.cell) != masCha:return
	var cha
	if masCha.has_method("summChara"):
		cha = masCha.summChara(masCha.id)
	else:
		cha = masCha.newChara(masCha.id, masCha.cell)

	for i in masCha.items:
		var item = sys.newItem(i.id)
		cha.addItem(item)

func upgrade():
	name = "[color=#FFFF00][史诗]投影仪"
	info = "战斗开始时会召唤一个佩戴者的克隆体\n一个角色只能携带一件本装备"
	att.defR = 0